class FakeXBMCGUI(object):
  # For command line testing outside of XBMC
  class Dialog(object):
    def select(self, sTitle, asOptions):
      print "%s" % sTitle;
      for iIndex in xrange(len(asOptions)):
        print "%2d: %s" % (iIndex + 1, asOptions[iIndex]);
      while 1:
        sChosenIndex = raw_input("Type a number and press ENTER...");
        try:
          iIndex = int(sChosenIndex);
        except ValueError:
          continue;
        if iIndex > 0 and iIndex <= len(asOptions):
          return iIndex - 1;
        #loop
    def ok(self, sTitle, sLine1="", sLine2="", sLine3=""):
      print "%s|%s|%s|%s|0%%" % (sTitle, sLine1, sLine2, sLine3);
      raw_input("Press ENTER to continue...");
    def yesno(self, sTitle, sLine1="", sLine2="", sLine3=""):
      print "%s|%s|%s|%s|0%%" % (sTitle, sLine1, sLine2, sLine3);
      return raw_input("Type [Y] or N and ENTER to continue...")[:1].upper() != "N";
  class DialogProgress(object):
    def create(self, sTitle, sLine1="", sLine2="", sLine3=""):
      self.sTitle = sTitle;
      print "%s|%s|%s|%s|0%%" % (sTitle, sLine1, sLine2, sLine3);
    def update(self, iPercent, sLine1="", sLine2="", sLine3=""):
      print "%s|%s|%s|%s|%d%%" % (self.sTitle, sLine1, sLine2, sLine3, iPercent);
    def iscanceled(self):
      return False;
    def close(self):
      pass;

